Optimal. Leaf size=95 \[ -\frac{i c^4 \tan ^2(e+f x)}{2 a f}+\frac{5 c^4 \tan (e+f x)}{a f}+\frac{8 i c^4}{f (a+i a \tan (e+f x))}-\frac{12 i c^4 \log (\cos (e+f x))}{a f}-\frac{12 c^4 x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.129874, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ -\frac{i c^4 \tan ^2(e+f x)}{2 a f}+\frac{5 c^4 \tan (e+f x)}{a f}+\frac{8 i c^4}{f (a+i a \tan (e+f x))}-\frac{12 i c^4 \log (\cos (e+f x))}{a f}-\frac{12 c^4 x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3522
Rule 3487
Rule 43
Rubi steps
\begin{align*} \int \frac{(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx &=\left (a^4 c^4\right ) \int \frac{\sec ^8(e+f x)}{(a+i a \tan (e+f x))^5} \, dx\\ &=-\frac{\left (i c^4\right ) \operatorname{Subst}\left (\int \frac{(a-x)^3}{(a+x)^2} \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac{\left (i c^4\right ) \operatorname{Subst}\left (\int \left (5 a-x+\frac{8 a^3}{(a+x)^2}-\frac{12 a^2}{a+x}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac{12 c^4 x}{a}-\frac{12 i c^4 \log (\cos (e+f x))}{a f}+\frac{5 c^4 \tan (e+f x)}{a f}-\frac{i c^4 \tan ^2(e+f x)}{2 a f}+\frac{8 i c^4}{f (a+i a \tan (e+f x))}\\ \end{align*}
Mathematica [B] time = 2.67013, size = 194, normalized size = 2.04 \[ \frac{c^4 \cos (e) \sec (e+f x) (\cos (f x)+i \sin (f x)) \left (-24 f x \tan ^2(e)-24 i (\tan (e)-i) \tan ^{-1}(\tan (f x))+24 f x \sec ^2(e)-i \sec ^2(e+f x)-8 i \tan (e) \sin (2 f x)-12 i \log \left (\cos ^2(e+f x)\right )+8 (\tan (e)+i) \cos (2 f x)+\tan (e) \sec ^2(e+f x)+10 \sec (e) \sin (f x) \sec (e+f x)+12 \tan (e) \log \left (\cos ^2(e+f x)\right )+10 i \tan (e) \sec (e) \sin (f x) \sec (e+f x)-24 f x+8 \sin (2 f x)\right )}{2 f (a+i a \tan (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.027, size = 83, normalized size = 0.9 \begin{align*} 5\,{\frac{{c}^{4}\tan \left ( fx+e \right ) }{af}}-{\frac{{\frac{i}{2}}{c}^{4} \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{af}}+{\frac{12\,i{c}^{4}\ln \left ( \tan \left ( fx+e \right ) -i \right ) }{af}}+8\,{\frac{{c}^{4}}{af \left ( \tan \left ( fx+e \right ) -i \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.43827, size = 462, normalized size = 4.86 \begin{align*} -\frac{24 \, c^{4} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 4 i \, c^{4} +{\left (48 \, c^{4} f x - 12 i \, c^{4}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (24 \, c^{4} f x - 18 i \, c^{4}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} -{\left (-12 i \, c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} - 24 i \, c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 12 i \, c^{4} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{a f e^{\left (6 i \, f x + 6 i \, e\right )} + 2 \, a f e^{\left (4 i \, f x + 4 i \, e\right )} + a f e^{\left (2 i \, f x + 2 i \, e\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 3.91423, size = 162, normalized size = 1.71 \begin{align*} \frac{\frac{8 i c^{4} e^{- 2 i e} e^{2 i f x}}{a f} + \frac{10 i c^{4} e^{- 4 i e}}{a f}}{e^{4 i f x} + 2 e^{- 2 i e} e^{2 i f x} + e^{- 4 i e}} - \frac{12 i c^{4} \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a f} - \frac{\left (\begin{cases} 24 c^{4} x e^{2 i e} - \frac{4 i c^{4} e^{- 2 i f x}}{f} & \text{for}\: f \neq 0 \\x \left (24 c^{4} e^{2 i e} - 8 c^{4}\right ) & \text{otherwise} \end{cases}\right ) e^{- 2 i e}}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.56524, size = 273, normalized size = 2.87 \begin{align*} \frac{2 \,{\left (\frac{12 i \, c^{4} \log \left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}{a} - \frac{6 i \, c^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac{6 i \, c^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a} - \frac{13 \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} - 9 i \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 24 \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 9 i \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 13 \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - i \, \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + i\right )}^{2} a}\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]